/*
 Navicat Premium Dump SQL

 Source Server         : fddtest
 Source Server Type    : MySQL
 Source Server Version : 90001 (9.0.1)
 Source Host           : localhost:3306
 Source Schema         : home_furnishing

 Target Server Type    : MySQL
 Target Server Version : 90001 (9.0.1)
 File Encoding         : 65001

 Date: 01/04/2025 23:17:01
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(32) NOT NULL,
  `password` varchar(32) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of admin
-- ----------------------------
BEGIN;
INSERT INTO `admin` (`id`, `username`, `password`) VALUES (1, 'admin', '21232f297a57a5a743894a0e4a801fc3');
COMMIT;

-- ----------------------------
-- Table structure for furn
-- ----------------------------
DROP TABLE IF EXISTS `furn`;
CREATE TABLE `furn` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `maker` varchar(64) NOT NULL,
  `price` decimal(11,2) NOT NULL,
  `sales` int unsigned NOT NULL,
  `stock` int unsigned NOT NULL,
  `img_path` varchar(256) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of furn
-- ----------------------------
BEGIN;
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (1, '西欧风格小桌子', '东东家居', 1801.00, 6616, 71, 'assets/images/product-image/default.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (2, '简约风格小椅子', '熊猫家居', 180.00, 666, 7, 'assets/images/product-image/4.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (3, '典雅风格小台灯', '蚂蚁家居', 180.00, 666, 7, 'assets/images/product-image/14.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (4, '温馨风格盆景架', '蚂蚁家居', 180.00, 666, 7, 'assets/images/product-image/13.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (5, '可爱的沙发', '东胜沙发', 999.99, 100, 100, 'assets/images/product-image/default.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (6, 'Name', 'èèå®¶å±1', 60.00, 100, 80, 'assets/images/product-image/default.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (7, 'Name', 'èèå®¶å±2', 60.00, 100, 80, 'assets/images/product-image/default.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (8, 'Name', '居然之家2', 60.00, 100, 80, 'assets/images/product-image/default.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (9, '可爱的沙发', '东胜沙发', 999.99, 100, 100, 'assets/images/product-image/default.jpg');
INSERT INTO `furn` (`id`, `name`, `maker`, `price`, `sales`, `stock`, `img_path`) VALUES (14, '小桌子', '蚂蚁家居2', 60.00, 120, 77, 'assets/images/product-image/default.jpg');
COMMIT;

-- ----------------------------
-- Table structure for member
-- ----------------------------
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(32) NOT NULL,
  `password` varchar(32) NOT NULL,
  `email` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of member
-- ----------------------------
BEGIN;
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (1, 'milan1', 'e10adc3949ba59abbe56e057f20f883e', 'EMAIL');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (4, 'mary', 'e10adc3949ba59abbe56e057f20f883e', 'mary@qq.com');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (6, 'mary1', 'aaa42296669b958c3cee6c0475c8093e', 'mary1@1qq.com');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (7, 'mary2', 'aaa42296669b958c3cee6c0475c8093e', 'mary1@1qq.com');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (11, 'mary3', '6978915ee7dbc5aff1bc34b59e8c0fc5', 'mary1@1qq.com');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (13, 'milan3', 'e10adc3949ba59abbe56e057f20f883e', 'EMAIL');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (15, 'fdsads', '60d578a57cb9d7db41944b07c440d21e', 'fdd@qq.com');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (16, 'fdfass', '60d578a57cb9d7db41944b07c440d21e', 'fdd@qq.com');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (17, 'fsfafa', '60d578a57cb9d7db41944b07c440d21e', 'fdd@qq.com');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (18, '177559221', '60d578a57cb9d7db41944b07c440d21e', 'fdd@qq.com');
INSERT INTO `member` (`id`, `username`, `password`, `email`) VALUES (19, 'fddtest', 'e10adc3949ba59abbe56e057f20f883e', 'fdd@qq.com');
COMMIT;

-- ----------------------------
-- Table structure for order
-- ----------------------------
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
  `id` varchar(64) NOT NULL,
  `create_time` datetime NOT NULL,
  `price` decimal(11,2) NOT NULL,
  `status` tinyint NOT NULL,
  `member_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for order_item
-- ----------------------------
DROP TABLE IF EXISTS `order_item`;
CREATE TABLE `order_item` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  `price` decimal(11,2) NOT NULL,
  `count` int NOT NULL,
  `total_price` decimal(11,2) NOT NULL,
  `order_id` varchar(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of order_item
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
